This invention relates generally to the field of computer graphics, and more particularly to antialiasing parameterized procedural solid textures in a computer graphics system.
Procedural solid texturing is a method for simulating the sculpture of objects of arbitrary detail and type, out of a solid material such as wood or stone. Procedural solid texture also simulates the natural elements of fire, water, waves, clouds, and earth (terrain and planets) on computer modeled objects. Solid texturing creates the illusion that a shape is carved out of a solid three-dimensional substance. For example, FIGS. 1 and 3 show representations of a marble and wood texture pattern (without coloring). The grain features on the sphere in FIG. 1 and teapot in FIG. 3 align with the block of material out of which they were sculpted. FIG. 1 shows a line drawing of a marble texture where the veins of the marble 22 are shown and would be on a rock colored background 24. FIG. 2 is a line drawing of a fractal planet where there are patches of fractal mountains 26 and a procedurally textured ocean 28. FIG. 3 shows a teapot 29 carved out of a block of wood which is procedurally textured with a wood grain 32 and a wood background color 30. High quality prints which show the fine details and coloring generated by the procedural textures can be found in Section 20.8 of Computer Graphics: Principles and Practice, Foley D., Second Edition, 1996, Addison-Wesley Publishing. By using procedural solid texturing, the details of a solid texture align across edges and corners of a jointed object surface. For example, when a procedural texture is applied to a teapot of FIG. 3 it appears to be carved out of the same continuous block, whereas a tiled texture would inevitably be disjointed at the seams. Depending on the detail and type of the object, similar alignment of two dimensional (2D) image texture maps can be tricky or even impossible.
Procedural textures require much less memory than stored image textures, and unlike image textures their resolution depends only on computation precision. Procedural textures which simulate sky and water can extend to infinity with non-repeating procedural detail. Fire may also be procedurally textured on a single polygon with repeating fine detail. Simulated planet coastlines can reveal an arbitrarily intricate level of detail depending on the number of noise functions used in the generation of its procedural texture. Even the reflection of the moon on water can be simulated without ray tracing or environment mapping by manipulation of the color maps of a procedural texture.
While this popular, powerful and flexible technique is found in nearly all high-quality photorealistic rendering packages, it has not yet found its way into consumer-level hardware for real-time rendering. Procedural solid textures would greatly enrich the quality of some of the 2D-image-textured graphical elements found in 3-D interactive games and virtual worlds. These types of textures would provide not only wooden and stone objects, but expansive terrain, oceans and skies filled with non-repeating detail.
Some have identified memory bandwidth as a major obstacle in increasing the performance of real-time graphics hardware. While memory size grows at a rate of 50% per year (one thousandfold over the past two decades), memory bandwidth only grows 12% per year (only tenfold over the past two decades). Conventional 2D texture mapping, in particular, relies heavily on memory. The bandwidth of this memory is the primary factor limiting the number and complexity of 2D image textures available in real-time. Some have overcome the memory bandwidth limitation at the expense of increasing memory size to hold multiple redundant copies of the texture. Others have relaxed the memory bandwidth limitations by reducing the size of the textures via compression. Procedural texturing hardware is a way of increasing the performance of current graphics hardware by augmenting its existing pre-stored 2D image textures with a variety of procedural solid textures without heavily impacting the hardware""s memory requirements. Accessing a procedural texture requires more time or computing power than an image texture as the texture value must be computed instead of accessed from memory. Hence, real-time procedural texturing has previously only been available in high-end parallel graphics systems. These systems have also implemented solid texturing in hardware.
Antialiasing procedural textures is more complicated than for stored image textures. Whereas MIP maps and summed-area tables can be pre-computed and stored for image textures, procedural textures are generated on the fly and such antialiasing techniques can not be readily applied. Supersampling is a common technique for antialiasing procedural textures but directly increases rendering time. Bandlimiting the procedural texture is also an effective antialiasing technique, but it only works easily and efficiently on procedures based completely on spectral synthesis. Accordingly, it would be an improvement in the art to develop a method and apparatus for antialiasing procedural textures which could be implemented in hardware. Additionally, it would be an improvement over the prior art to create a solid texture procedure which could provide procedural solid textures as a result of parameters passed to the procedure. Further, it would be an advancement in the art to develop an approximation of procedural texture modeling which could be implemented in a minimal amount of hardware.
It is an object of the present invention to provide a solid texturing procedure which receives parameters and produces selected procedural texture based on the values of the parameters received.
It is another object of the present invention to provide a method for antialiasing a solid texture procedure.
It is another object of the present invention to provide an approximation of solid texturing which can be implemented efficiently and cheaply in hardware.
It is yet another object of the present invention to provide a method for procedural solid texturing using a procedural solid texture generator which can generate multiple textures.
The presently preferred embodiment of the present invention is a method for applying procedural solid texturing to a computer generated image by mapping solid texture coordinates into a color space. The first step of producing a procedural solid texture is creating a quadric function generator to provide a quadric mapping function in three dimensional space.
Then a noise function generator is combined with the quadric classification function generator to generate controlled stochastic values based on a specified input. The noise function can be generated using a Perlin noise function. Next, parameters are passed to the quadric function generator and the noise generator to determine a type of solid texturing that will be applied to a computer generated image. The parameters passed to the procedural solid texturing function determine the type of texture that is generated such as fire, water, clouds, etc.
In an alternative embodiment, of the invention the procedural texturing is antialiased after it is generated. The first step in antialiasing the procedural texture is determining the proper sampling frequency for the procedural solid texture to thereby determine the width of a filter. Then a filter is applied to the elements of the color table used by the procedural texturing to average the entries of the color table over the width of the filter where the filter width is based on the sampling frequency or the rate of change of the procedural texture at a given point.
In an alternative embodiment of the invention the procedural texture is antialiased by determining the proper sampling frequency for the procedural solid texture by finding the derivative of the procedural texture function. Then a value is calculated which has a magnitude for the width of the filter by taking half of the derivative. Finally, the color look up table entries between indices half a pixel in each direction on the derivative are averaged.
These and other objects, features, advantages and alternative aspects of the present invention will become apparent to those skilled in the art from a consideration of the following detailed description taken in combination with the accompanying drawings.